package com.session1;

public class Bird extends Animal {
    public Bird(String food, String sound) {
        super(food, sound);
    }

    @Override
    public void eat() {
        System.out.println("小鸟喜欢吃" + this.getFood());
    }

    @Override
    public void sound() {
        System.out.println("小鸟" + this.getSound() + "叫");
    }

    public void fly() {
        System.out.println("小鸟自由自在飞");
    }
}
